package com.winenine999.generator.dao;

import com.winenine999.model.Purchasesub;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface PurchasesubMapper {
    @Delete({
        "delete from purchasesub",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into purchasesub (id, phid, ",
        "wid)",
        "values (#{id,jdbcType=INTEGER}, #{phid,jdbcType=INTEGER}, ",
        "#{wid,jdbcType=INTEGER})"
    })
    int insert(Purchasesub record);

    int insertSelective(Purchasesub record);

    @Select({
        "select",
        "id, phid, wid",
        "from purchasesub",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("com.winenine999.generator.dao.PurchasesubMapper.BaseResultMap")
    Purchasesub selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Purchasesub record);

    @Update({
        "update purchasesub",
        "set phid = #{phid,jdbcType=INTEGER},",
          "wid = #{wid,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(Purchasesub record);
}